package com.example.messagequeue;

import com.example.messagequeue.mqserver.BrokerServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.io.IOException;

@SpringBootApplication
public class MessageQueueApplication {
    public static ConfigurableApplicationContext  context;
    public static void main(String[] args) {
        context = SpringApplication.run(MessageQueueApplication.class, args);
        try {
            BrokerServer brokerServer = new BrokerServer(9091);
            brokerServer.start();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
